<?php
namespace Admin\Controller;
use Common\Controller\AdminBaseController;

/**
 * 后台首页控制器
 */
class ProductController extends AdminBaseController{
	/**
	 * 商品库 - 首页
	 */
	public function index(){

		$total_page = $this->total_page;

		$data = D('Product')->index($total_page);

		$this->assign($data);

		$this->display();

	}

	/**
	 * 添加商品
	 */
	public function addProduct(){

		$data = D('Product')->addProduct();

		$this->ajaxReturn($data);

	}

	/**
	 * 编辑商品
	 */
	public function editProduct(){

		$data = D('Product')->editProduct();

		$this->ajaxReturn($data);

	}


}
